Other Classes
The following classes are available globally.
-
An abstract API client.
Stateful hosts
In order to avoid hitting timeouts at every request when one or more hosts are not working properly (whatever the reason: DNS failure, no route to host, server down…), the client maintains a known status for each host. That status can be either up, down or unknown. Initially, all hosts are in the unknown state. Then a given host’s status is updated whenever a request to it returns a response or an error.
When a host is flagged as down, it will not be considered for subsequent requests. However, to avoid discarding hosts permanently, statuses are only remembered for a given timeframe, indicated by
See morehostStatusTimeout
. (You may adjust it as needed, although the default valuedefaultHostStatusTimeout
should make sense for most applications.)Declaration
Swift
@objcMembers public class AbstractClient : NSObject
-
Declaration
Swift
@objc open class AbstractQuery : NSObject, NSCopying
-
Per-request options. This class allows specifying options at the request level, overriding default options at the
Client
level.Note
These are reserved for advanced use cases. In most situations, they shouldn’t be needed.Declaration
Swift
@objc public class RequestOptions : NSObject, NSCopying